package com.samples.model;

import java.io.Serializable;

/**
 *
 * @author Bora SAYINER
 * @since Jan 24, 2015 7:18:11 PM
 * @version 1.0
 */
public class Customer implements Serializable {

	private int id;
	private String name;
	private String email;
	private String phone;
	private String city;

	public Customer() {
		this(null, null, null, null);
	}

	public Customer(String name, String email, String phone, String city) {
		this.name = name;
		this.email = email;
		this.phone = phone;
		this.city = city;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getCity() {
		return city;
	}

	public void setCity(String city) {
		this.city = city;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + id;
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj) return true;
		if (obj == null) return false;
		if (getClass() != obj.getClass()) return false;
		Customer other = (Customer) obj;
		if (id != other.id) return false;
		return true;
	}

}
